{block name="itemLink"}
  {if $item['url']}
    <a href="{$item['url']}">
  {else}
    <span class="nolink">
  {/if}
    <div {if {$reply}}class="tile triple bg-color-red note" style="cursor: default; margin-left: 45px; z-index: 1;"{else}class="tile triple bg-color-green note" style="cursor: default; z-index: 1; padding-left: 0;"{/if}>
            <div class="tile-content">
                    <img src="{$item['img']}" height = "50" width = "50" class="place-left"/>
                    <h3>{$item['username']} {if $item['loc'] != ""}@{$item['loc']}{/if} {$item['date']}</h3>
                    <p>
                            {$item['message']}  
                    </p>
            </div>
              {if $item['url']}
                </a>
              {else}
                </span>
              {/if}
            {if {$item['login']}}
                <div class="likeimg" id="likeimg{$item['postID']}" style="z-index: 2">
                      <img onclick="likes('{$item['postID']}');" src="{$item['likeimg']}" style="width: 24px; height: 24px"/>
                </div>
                
                <div class="likes" id="likes{$item['postID']}"><span class="name">{$item['likes']}</span></div>
                
                <div id="flagimg{$item['postID']}" class="flag" style="z-index: 2"><img onclick="flags('{$item['postID']}');" src="{$item['flagimg']}"/></div>    
            {/if}
    </div>
        
{/block}
